'use strict';

const db = uniCloud.database();
exports.main = async (event, context) => {
	let {
		pages = 0, pageSize = 5
	} = event
	// (1 - pages) * pageSize
	let res = await db.collection("cloud_article").orderBy("uploadtime", "desc").limit(pageSize).skip(pages).get()
	return res
};